version: '3.3'
services:
    php-apache_env:
        container_name: php-apache
        build:
            context: .
            dockerfile: Dockerfile
        depends_on:
            - db
        volumes:
            - .:/var/www/html
        ports:
            - 80:80
    db:                
        container_name: db
        image: mysql
        command: --default-authentication-plugin=mysql_native_password
        restart: always
        environment:
            MYSQL_ROOT_PASSWORD: 123
        volumes:
            - db-data:/var/lid/mysql
        ports:
            - 3306:3306
    phpmyadmin:
        image: phpmyadmin
        restart: always
        ports:
            - 8080:80
    adminer:
        image: adminer
        restart: always
        ports:
            - 8081:8080
    postgres:
        image: postgres
        restart: always
        environment:
            POSTGRES_PASSWORD: 123
        ports:
            - 5432:5432
        volumes:
            - db-postgre:/var/lib/postgresql/data    
       
volumes:
    db-data:
    db-postgre:
                    
